unit UnitCadastroUsuarios;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBCtrls, StdCtrls, Buttons, XPMenu, ExtCtrls;

type
  TFormCadastroUsuarios = class(TForm)
    Panel1: TPanel;
    dblbUsuarios: TDBLookupListBox;
    BitBtn1: TBitBtn;
    bbtnExcluir: TBitBtn;
    bbtnFechar: TBitBtn;
    XPMenu1: TXPMenu;
    procedure FormShow(Sender: TObject);
    procedure bbtnExcluirClick(Sender: TObject);
    procedure bbtnFecharClick(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormCadastroUsuarios: TFormCadastroUsuarios;

implementation

uses UDM, UfDlgLogin, UnitDlgNovoUsuario;

{$R *.dfm}

procedure TFormCadastroUsuarios.FormShow(Sender: TObject);
begin
   dm.CDSSenha.Open;
end;

procedure TFormCadastroUsuarios.bbtnExcluirClick(Sender: TObject);
begin
  dm.CDSSenha.Delete;
  dm.CDSSenha.ApplyUpdates(0);
end;

procedure TFormCadastroUsuarios.bbtnFecharClick(Sender: TObject);
begin
  dm.CDSSenha.Close;
end;

procedure TFormCadastroUsuarios.BitBtn1Click(Sender: TObject);
begin
  dm.CDSSenha.Append;
  application.CreateForm(TformDlgNovoUsuario, formDlgNovoUsuario);
  formDlgNovoUsuario.ShowModal;
  formDlgNovoUsuario.Free;
end;

end.
